package UnitTest.AlgorithmTest.backtrackTest;

import Algorithm.backtrack.ArrayPermutation;
import org.junit.Test;
import java.util.List;

/**
 * @author liujun
 * @version 1.0
 * @date 2021/1/19
 * @author—Email liujunfirst@outlook.com
 * @blogURL https://blog.csdn.net/ljfirst
 * @description 数组的连续积小于给定值的组合 测试案例
 */
public class ArrayPermutationTest {

    ArrayPermutation arrayPermutation = new ArrayPermutation();

   // @Test
    public void test() {
        List<List> list_all = arrayPermutation.getAnswer(demo01, target01);
        for (int i = 0; i < list_all.size(); i++) {
            List list = list_all.get(i);
            for (int j = 0; j < list.size(); j++) {
                System.out.print(list.get(j) + " ");
            }
            System.out.println();
        }
        System.out.println("/n/n/n");

        list_all = arrayPermutation.getAnswer(demo02, target02);
        for (int i = 0; i < list_all.size(); i++) {
            List list = list_all.get(i);
            for (int j = 0; j < list.size(); j++) {
                System.out.print(list.get(j) + " ");
            }
            System.out.println();
        }

    }

    int[] demo01 = {10, 5, 2, 6};
    int target01 = 100;
    int[] demo02 = {2, 8, 4, 6, 9, 3};
    int target02 = 64;
}
